import { timestamp } from "@vueuse/core"
import { BaseRequest } from "../http"


export const login = (data) =>{ // 登录
  return BaseRequest.post({
    url: `/user/login`,
    data
  })
}

export const register = (data) =>{ // 注册
  return BaseRequest.post({
    url: `/user/register`,
    data
  })
}

export const getCaptchaSVG = (data) =>{ // 获取验证码
  return BaseRequest.get({
    url: `/captcha`,
    data: {
      ...data,
      timestamp: new Date().getTime()
    }
  })
}